package com.tg.app.activity.account;

import android.os.Bundle;
import android.view.View;
import android.view.Window;

import androidx.annotation.Nullable;

import com.hjq.permissions.OnPermissionCallback;
import com.hjq.permissions.Permission;
import com.hjq.permissions.XXPermissions;
import com.tg.app.R;
import com.base.BaseActivity;

import java.util.List;

public class OpenNotifyMessageActivity extends BaseActivity implements View.OnClickListener {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//remove title bar  即隐藏标题栏
        setContentView(R.layout.activity_open_notifymessage);
        initView();
        hideActionBar();// 隐藏ActionBar
    }

    @Override
    public boolean shouldSetStatusBarColor() {
        return true;
    }

    protected void initView() {
        findViewById(R.id.login).setOnClickListener(this);
        modifyToolBar(R.string.new_notification);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.login) {
            XXPermissions.with(this).permission(Permission.NOTIFICATION_SERVICE)
                    .request(new OnPermissionCallback() {
                        @Override
                        public void onGranted(List<String> permissions, boolean all) {

                        }

                        @Override
                        public void onDenied(List<String> permissions, boolean never) {

                        }
                    });

        }
    }
}
